/**
 * Created by mill on 2017/11/19.
 */
import React , {Component} from 'react';
import {render} from 'react-dom';

class NotesList extends Component{
    render() {
        return (
            <ol>
                {
                    React.Children.map(this.props.children, function (child) {
                        return <li>{child}</li>;
                    })
                }
            </ol>
        );
    }
}
render(
    <NotesList>
        <span>hello</span>
        <span>world</span>
    </NotesList>,
    document.getElementById('example')
);

